﻿using System.Linq;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.ServiceProvider;

namespace ZBJF.Warranty.IBLL
{
    public partial interface IServiceProviderService
    {
        /// <summary>
        /// 根据主键ID获取服务商
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ServiceProvider LoadByID(int id);
        /// <summary>
        /// 判断服务商是否存在
        /// </summary>
        /// <param name="accessoriestName">服务商名称</param>
        /// <param name="id">服务商ID</param>
        /// <returns></returns>
        bool IsExist(string serviceProviderName, int id = 0);

        /// <summary>
        /// 分页获取服务商列表
        /// </summary>
        /// <param name="model">过滤条件</param>
        /// <param name="total">总数量</param>
        /// <returns></returns>
        IQueryable<ServiceProvider> GetPagingList(ServiceProviderModel model, out int total);
    }
}
